<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>注册</title>
<script type="text/javascript" src="${ctx}/resource/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="${ctx}/resource/js/common.js"></script>
</head>
<body>
	<form action="${ctx}/test/testRegisterAction.html" method="post">
		<table>
			<tr>
				<td colspan="2" class="retMsg">${BASE.retMsg}</td>
			</tr>
			<tr>
				<td>帐号：</td>
				<td><input type="text" name="name" value="" /></td>
			</tr>
			<tr>
				<td>密码：</td>
				<td><input type="password" name="pwd" value="" /></td>
			</tr>
			<tr>
				<td colspan="2"><input type="submit" value="注册" /> <a href="${ctx}/test/testLogin.html">返回登录</a></td>
			</tr>
		</table>
	</form>
</body>
<script type="text/javascript">
	$(function() {
		$("input[name=name]").blur(function() {
			var val = $(this).val();
			sendRequest("${ctx}/test/ajaxCheckName.html", {
				name : val
			}, function(data) {
				var obj = jQuery.parseJSON(data);
				$(".retMsg").text(obj.retMsg);
			});
		});
	})
</script>
</html>